package com.xt.stock.project.common.exception;

/**
 * 自定义全局统一异常类
 */
public class XtServiceException extends RuntimeException {

    private static final long serialVersionUID = 1L;
    //错误码
    private int errorCode;

    public XtServiceException(int errorCode, String errorMsg, Throwable e) {
        super(errorMsg, e);
        this.errorCode = errorCode;
    }

    public XtServiceException(int errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
    }

    public int getErrorCode() {
        return errorCode;
    }
}
